package pri.black.dogview.component;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class RandomSeed {

    Long seed = 0L;

    Random random;

    @PostConstruct
    void init(){
        seed = System.currentTimeMillis();
        random = new Random(seed);
    }

    public Long rand(){
        return random.nextLong(1000);
    }
}
